#ifndef __GLOBAL_H
#define __GLOBAL_H

#include "userconfig.h"


#define DEBUG  0

typedef union
{
    unsigned char byte;
    struct
    {
        unsigned char beepid:4;
        unsigned char seq:4;
    }func;
}BEEP_t;
extern BEEP_t u8BeepType;



//UART
#define Model_Disinfect				0x01
#define Model_Steamer				0x02
#define Model_One_Steam_Oven		0x03
#define Model_Two_Steam_Oven		0x04
#define Model_Micro_Steam_Oven		0x05
#define Model_Head_Controller		0x06
#define Model_Ice_Steam				0x07
#define Model_CookingMachine		0x08
#define Model_Dishwasher			0x09
#define Model_Fruit_Vegetable		0x0a
#define Model_FCT					0x3F

typedef union
{
	u8 byte;
	struct
	{
		u8 b_rxd_sta				: 1;
		u8 b_rxd_ok					: 1;
		u8 b_rxd_Frame_head_rx_ok	: 1;
		u8 b_type_initl_ok			: 1;
		u8 b_txd_sta				: 1;
		u8 b_txd_200ms_pro			: 1;
		u8 b_txd_40ms_pro			: 1;
		u8 bit7 : 1;
	}bits;
}Uart_t;

//TK
typedef union
{
	u8 byte;
	struct
	{
		u8 b_Twi_TK_tx_pnd		: 1;
		u8 b_Twi_TK_rx_pnd 		: 1;
		u8 bit2 : 1;
		u8 bit3 : 1;
		u8 bit4 : 1;
		u8 bit5 : 1;
		u8 bit6 : 1;
		u8 bit7 : 1;
	}bits;
}TwiTKBuff_t;
extern TwiTKBuff_t TwiTKBuff;

extern u8 u8KeyBuff[3];




//RTC
extern u8 u8RtcHour;
extern u8 u8RtcMin;
extern u8 u8RtcSec;


#endif
